<!DOCTYPE html>
<html>
    <head>
        <title>
            Super Mustache Demo
        </title>
        <meta charset="UTF-8">
    </head>
    <body>
        <div id="test">{{Super}}{{Super1}}{{Super2}}{{Super3}}{{Super4}}{{Super5}}{{Super6}}{{Super7}}{{Super8}}{{Super9}}{{Super10}}{{Super11}}{{Super12}}{{Super13}}{{Super14}}{{Super15}}{{Super16}}{{Super17}}{{Super18}}{{Super19}}{{Super20}} {{var}} {{var2}}</div>
        <script src="SM.js"></script>
        <script src="Mustache.js"></script>
        <script>
            window.onload = function(){
                console.time("编译时间：");
                var obj = {
                    var: "Mustache",
                    Super: "Super",
                    var2: "<span style='color:red;'></span>",
                    Super1: "Super",
                    Super17: "Super",
                    Super16: "Super",
                    Super15: "Super",
                    Super14: "Super",
                    Super13: "Super",
                    Super12: "Super",
                    Super11: "Super",
                    Super10: "Super",
                    Super9: "Super",
                    Super8: "Super",
                    Super7: "Super",
                    Super6: "Super",
                    Super5: "Super",
                    Super4: "Super",
                    Super3: "Super",
                    Super2: "Super",
                    Super18: "Super",
                    Super19: "Super",
                    Super20: "Super"
                }
                //Super Mustache，使用这种方法来使用Super Mustache
                var tm = document.getElementById("test").innerHTML;
                document.getElementById("test").innerHTML = SM(tm,obj).do();
                console.timeEnd("编译时间：");
            }
        </script>
    </body>
</html>